how to reference a value in a layout dxl column?

I have a module A, with 2 columns. The first column, called reqID is a dxl layout column with the requirement ID extracted. The second column has the requirement ID + requirement text. I saved this into view A.

I have another module B, that has a column called verID's which has identical values to reqID's (because they are used to verify the reqID's). For every verID I wand to find the matching reqID but I'm having trouble referencing the value in the dxl layout reqID column.

I do not want to make the reqID a permanent attribute, how can I just reference it's value using DXL?
Any help would be much appreciated.

Leilani
lsand - Thu Sep 09 19:37:24 EDT 2010

Re: how to reference a value in a layout dxl column?
Peter_Albert - Fri Sep 10 02:57:26 EDT 2010

You can use

Column column([Module m,]int n)

and

string text(Column c, Object o)

to get the text out of a certain layoutDXL column (For the first column, n = 0). But the approach is risky: Once you change the view and move the column to a different position, or if you run the script from the wrong view, then the script will break.

It is probably better to check the underlying layoutDXL code and understand how the requirement ID is extracted. You can use this understanding to build a more robust code for finding matching reqIDs.

Regards,

Peter

Re: how to reference a value in a layout dxl column?
llandale - Tue Sep 14 15:52:23 EDT 2010

Peter_Albert - Fri Sep 10 02:57:26 EDT 2010

You can use

Column column([Module m,]int n)

and

string text(Column c, Object o)

to get the text out of a certain layoutDXL column (For the first column, n = 0). But the approach is risky: Once you change the view and move the column to a different position, or if you run the script from the wrong view, then the script will break.

It is probably better to check the underlying layoutDXL code and understand how the requirement ID is extracted. You can use this understanding to build a more robust code for finding matching reqIDs.

Regards,

Peter

Yes it gets tricky. Perhaps browse all the current columns of the module looking for one with a specific "title(col)". I don't recall the exact rules, but "text(col)" yes works for layout but doesn't work for the "main(col)" column.

Re: how to reference a value in a layout dxl column?
llandale - Tue Sep 14 15:54:34 EDT 2010

It seems pretty clear that you should make ReqID an attrDXL rather than a layout. Display that attr in your view. The Layout in B would follow the link to the object in A, then query that object's attr value for ReqID; perhaps .

  • Louie

Re: how to reference a value in a layout dxl column?
lsand - Tue Sep 14 17:18:13 EDT 2010

llandale - Tue Sep 14 15:54:34 EDT 2010
It seems pretty clear that you should make ReqID an attrDXL rather than a layout. Display that attr in your view. The Layout in B would follow the link to the object in A, then query that object's attr value for ReqID; perhaps .

  • Louie

thanks!